================================================================|| C-CODED FIG-FORTH for UNIX* systems by ALLAN PRATT |||| |||| INCLUDES \ COMMENTS, |||| CASE..OF..ENDOF..ENDCASE |||| UNTHREAD, EDITOR |||| REFORTH, |||| "ALIAS NEW OLD" |||| AND OTHER NICE THINGS. |||| ( * UNIX is a trademark of Bell Labs ) ||================================================================ ( UNTHREAD VERSION 2 / SCREEN 1 OF 3 ) : DOQUOTE \ AFTER (.") 34 EMIT WORDSIZE + DUP C@ OVER 1+ SWAP TYPE 34 EMIT SPACE DUP C@ + 1+ ; : DOLIT \ AFTER LIT, BRANCHES, AND (LOOP)S WORDSIZE + DUP @ . WORDSIZE + ; --> ( UNTHREAD VERSION 2 / SCREEN 2 OF 3 ) : DOWORD \ MAIN UNTHREADER DUP @ WORDSIZE + DUP NFA ID. CASE ' LIT OF DOLIT ENDOF ' 0BRANCH OF DOLIT ENDOF ' BRANCH OF DOLIT ENDOF ' (LOOP) OF DOLIT ENDOF ' (+LOOP) OF DOLIT ENDOF ' (.") OF DOQUOTE ENDOF ' ;S OF DROP 0 ENDOF \ LEAVE 0 DUP OF WORDSIZE + ENDOF \ DEFAULT ENDCASE ; --> ( UNTHREAD VERSION 2 / SCREEN 3 OF 3 ) : UNTHREAD \ USAGE: UNTHREAD WORD [COMPILE] ' DUP CFA @ ' DOWORD CFA @ <> 27 ?ERROR \ NOT THREADED CR ." : " DUP NFA ID. SPACE BEGIN DOWORD OUT @ C/L > IF CR THEN -DUP WHILE REPEAT ; CR ." UNTHREAD READY" ;S ( ERROR MESSAGES ) EMPTY STACK ISN'T UNIQUE FULL STACK C-CODED figFORTH by ALLAN PRATT / APRIL 1985 MSG # 16 MUST BE COMPILING MUST BE EXECUTING UNMATCHED STRUCTURES DEFINITION NOT FINISHED WORD IS PROTECTED BY FENCE MUST BE LOADING CONTEXT ISN'T CURRENT ALIAS: NOT A COLON DEFINITION ALIAS: CAN'T ALIAS A NULL WORD ." LOADING EDITOR FOR VT100" CR : CLS \ clear screen and home cursor 27 EMIT ." [2J" 27 EMIT ." [H" ; : LOCATE \ 0 16 LOCATE positions cursor at line 16, column 0 27 EMIT 91 EMIT 1+ 1 .R 59 EMIT 1+ 1 .R 72 EMIT ; : STANDOUT \ This can be a null word 27 EMIT ." [7m" ; : STANDEND \ This can be a null word, too. 27 EMIT ." [m" ; ;S \ CONTINUE LOADING EDITOR ." LOADING EDITOR FOR ADM5" CR : CLS 26 EMIT ; : LOCATE 27 EMIT 61 EMIT 32 + EMIT 32 + EMIT ; : STANDOUT 27 EMIT 71 EMIT ; : STANDEND 27 EMIT 71 EMIT ; ;S \ continue loading editor